<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>scapi.SCRedirectHandler</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="scapi-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SoundCloud API</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="scapi-module.html">Package&nbsp;scapi</a> ::
        Class&nbsp;SCRedirectHandler
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="scapi.SCRedirectHandler-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SCRedirectHandler</h1><span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler">source&nbsp;code</a></span><br /><br />
<pre class="base-tree">
    urllib2.BaseHandler --+    
                          |    
urllib2.HTTPRedirectHandler --+
                              |
                             <strong class="uidshort">SCRedirectHandler</strong>
</pre>

<hr />
A urllib2-Handler to deal with the redirects the RESTful API of SC 
  uses.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="scapi.SCRedirectHandler-class.html#http_error_303" class="summary-sig-name">http_error_303</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">req</span>,
        <span class="summary-sig-arg">fp</span>,
        <span class="summary-sig-arg">code</span>,
        <span class="summary-sig-arg">msg</span>,
        <span class="summary-sig-arg">hdrs</span>)</span><br />
      In case of return-code 303 (See-other), we have to store the 
      location we got because that will determine the actual type of 
      resource returned.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler.http_error_303">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="scapi.SCRedirectHandler-class.html#http_error_201" class="summary-sig-name">http_error_201</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">req</span>,
        <span class="summary-sig-arg">fp</span>,
        <span class="summary-sig-arg">code</span>,
        <span class="summary-sig-arg">msg</span>,
        <span class="summary-sig-arg">hdrs</span>)</span><br />
      We fake a 201 being a 303 so that our redirection-scheme takes 
      place for the 201 the API throws in case we created something.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler.http_error_201">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>urllib2.HTTPRedirectHandler</code></b>:
      <code>http_error_301</code>,
      <code>http_error_302</code>,
      <code>http_error_307</code>,
      <code>redirect_request</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>urllib2.BaseHandler</code></b>:
      <code>__lt__</code>,
      <code>add_parent</code>,
      <code>close</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="alternate_method"></a><span class="summary-name">alternate_method</span> = <code title="None">None</code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>urllib2.HTTPRedirectHandler</code></b>:
      <code>inf_msg</code>,
      <code>max_redirections</code>,
      <code>max_repeats</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>urllib2.BaseHandler</code></b>:
      <code>handler_order</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="http_error_303"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">http_error_303</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">req</span>,
        <span class="sig-arg">fp</span>,
        <span class="sig-arg">code</span>,
        <span class="sig-arg">msg</span>,
        <span class="sig-arg">hdrs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler.http_error_303">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  In case of return-code 303 (See-other), we have to store the location 
  we got because that will determine the actual type of resource 
  returned.
  <dl class="fields">
    <dt>Overrides:
      urllib2.HTTPRedirectHandler.http_error_302
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="http_error_201"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">http_error_201</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">req</span>,
        <span class="sig-arg">fp</span>,
        <span class="sig-arg">code</span>,
        <span class="sig-arg">msg</span>,
        <span class="sig-arg">hdrs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="scapi-pysrc.html#SCRedirectHandler.http_error_201">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  We fake a 201 being a 303 so that our redirection-scheme takes place 
  for the 201 the API throws in case we created something. If the location 
  is not available though, that means that whatever we created has succeded
  - without being a named resource. Assigning an asset to a track is an 
  example of such case.
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="scapi-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SoundCloud API</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Fri Apr 18 16:28:19 2008
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
